package com.ruoyi.web.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum TypeNameEnum {
    GPJJ("股票基金", 1),
    ZQJJ("债券基金", 2),
    GDSY("固定收益", 3),
    HBJJ("货币基金", 4),
    GP("股票", 5),
    ;

    private String typeName;
    private Integer orderNum;

    public static int getOrder(String typeName) {
        for (TypeNameEnum typeNameEnum : TypeNameEnum.values()) {
            if (typeNameEnum.typeName.equals(typeName)) {
                return typeNameEnum.orderNum;
            }
        }
        throw new RuntimeException("没有该枚举");
    }
}
